{include file="../../../application/admin/view/public/head" /}
<div class="page-container p10">
    <form class="layui-form layui-form-pane" method="post" action="">
        <input id="id" name="id" type="hidden" value="{$info.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">广告图片：</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" id="adpic" lay-verify="required" value="{$info.pic}" placeholder="请输入广告图片链接地址" name="pic">
                <a href="https://www.gudian.org/tools/tt.html" target="_blank" class="layui-btn" style="margin-top: 5px;">
                  <i class="layui-icon">&#xe67c;</i>上传广告图片（宽1080px，高1920px）
                </a>
                <img src="{$info.pic}" class="yulantu" style="max-height: 100px;display: block;margin-top: 10px;" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">关闭时间：</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" lay-verify="required" value="{$info.closetime}" placeholder="请输入关闭时间(秒)" name="closetime">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">跳转链接：</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" lay-verify="required" value="{$info.jumpurl}" placeholder="请输入跳转链接" name="jumpurl">
            </div>
        </div>
        <!--<div class="layui-form-item">-->
        <!--    <label class="layui-form-label">跳转方式：</label>-->
        <!--    <div class="layui-input-block" style="border: 1px solid #f1f1f1;">-->
        <!--        <input type="radio" name="jumpstatus" {if condition="$info['jumpstatus'] eq 0"}checked {/if} value="0" title="App内">-->
        <!--        <input type="radio" name="jumpstatus" {if condition="$info['jumpstatus'] eq 1"}checked {/if} value="1" title="App外">-->
        <!--    </div>-->
        <!--</div>-->
        
        <div class="layui-form-item">
            <label class="layui-form-label">状态：</label>
            <div class="layui-input-block" style="border: 1px solid #f1f1f1;">
                <input type="radio" name="status" {if condition="$info['status'] eq 0"}checked {/if} value="0" title="关闭">
                <input type="radio" name="status" {if condition="$info['status'] eq 1"}checked {/if} value="1" title="开启">
            </div>
        </div>

        <div class="layui-form-item center">
            <div class="layui-input-block">
                <input type="text" style="display:none;" name="jumpstatus" value="1">
                <input type="text" style="display:none" class="layui-input" value="3" placeholder="" name="adtype">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="formSubmit" data-child="true">保 存</button>
            </div>
        </div>
    </form>

</div>
{include file="../../../application/admin/view/public/foot" /}

<script type="text/javascript">
    layui.use(['form', 'layer'], function () {
        // 操作对象
        var form = layui.form
                , layer = layui.layer
                , $ = layui.jquery;
        $("#adpic").change(function() {
            $(".yulantu").attr("src", $(this).val());
        });

    });
</script>

</body>
</html>